﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Communicate
{
    internal class JSON_Private
    {
        private string _gprs_code;
        /// <summary>
        /// GPRS编号
        /// </summary>
        public string gprs_code
        {
            get { return _gprs_code; }
            set { _gprs_code = value; }
        }


        private string   _coord_cmd;
        /// <summary>
        /// 协调器功能代码
        /// </summary>
        public string   coord_cmd
        {
            get { return _coord_cmd; }
            set { _coord_cmd = value; }
        }


        private string   _coor_type="10";
        /// <summary>
        /// 协调器设备代码，默认10
        /// </summary>
        public string  coor_type
        {
            get { return _coor_type; }
            set { _coor_type = value; }
        }



        private int _coord_code;
        /// <summary>
        /// 协调器编号
        /// </summary>
        public int  coord_code
        {
            get { return _coord_code; }
            set { _coord_code = value; }
        }

        private string _network_way;
        /// <summary>
        /// 协调器网络ID
        /// </summary>
        public string network_way
        {
            get { return _network_way; }
            set { _network_way = value; }
        }

        private CMD[]  list;

        public CMD[] _list
        {
            get { return list; }
            set { list = value; }
        }


    }

   internal   class CMD
    {
        private int _command;
        /// <summary>
        /// 设备功能码
        /// </summary>
        public int device_cmd
        {
            get { return _command; }
            set { _command = value; }
        }

        private int _device_type;
        /// <summary>
        /// 设备类型
        /// </summary>
        public int device_type
        {
            get { return _device_type; }
            set { _device_type = value; }
        }

        private int[] _device_code;
        /// <summary>
        /// 设备ID
        /// </summary>
        public int[] device_code
        {
            get { return _device_code; }
            set { _device_code = value; }
        }

        private byte[] _data;
        /// <summary>
        /// 要传入的数据
        /// </summary>
        public byte[] device_data
        {
            get { return _data; }
            set { _data = value; }
        }

        /// <summary>
        /// 无线模块ID号
        /// </summary>
        public int wirless_code { get; set; }
    }

    public class RetCmd
    {
        /// <summary>
        /// GPRS编号
        /// </summary>
        public string gprs_code { set; get; }


        private string _device_cmd;
        /// <summary>
        /// 功能码
        /// </summary>
        public string device_cmd
        {
            get { return _device_cmd; }
            set { _device_cmd = value; }
        }

        private string _device_type;
        /// <summary>
        /// 设备类型
        /// </summary>
        public string device_type
        {
            get { return _device_type; }
            set { _device_type = value; }
        }


        private string _device_code;
        /// <summary>
        /// 设备编号
        /// </summary>
        public string device_code
        {
            get { return _device_code; }
            set { _device_code = value; }
        }

        private string _retdata;
        /// <summary>
        /// 返回数据，返回结果只有1个
        /// </summary>
        public string retdata
        {
            get { return _retdata; }
            set { _retdata = value; }
        }

        private string[] _list;
        /// <summary>
        /// 返回结果有多个放在这里
        /// </summary>
        public string[] list
        {
            get { return _list; }
            set { _list = value; }
        }

        private string _explain;
        /// <summary>
        /// 对结果的说明
        /// </summary>
        public string explain
        {
            get { return _explain; }
            set { _explain = value; }


        }


        public string  success { get; set; }
    }

    }
